home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
anwendungen
/
gw print
/
structurebrowser_v1.3
/
sources
/
sbimage.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-20
|
2KB
|
61 lines
/*
Handles the Intuition Image structure
*/
#include "header/sb.h"
extern int level; /* recursion level */
/*
PrImage
Put up the data for an Image structure
*/
PrImage (string, image)
char *string;
struct Image *image;
{
static struct StructData structdata [] =
{
{ "-LeftEdge", "SHORT", PRINT, INTSIZE },
{ "-TopEdge", "SHORT", PRINT, INTSIZE },
{ "-Width", "SHORT", PRINT, INTSIZE },
{ "-Height", "SHORT", PRINT, INTSIZE },
{ "-Depth", "SHORT", PRINT, INTSIZE },
{ " ImageData", "USHORT *", PRPTR, PTRSIZE },
{ "-PlanePick", "UBYTE", PRUBYTE, BYTESIZE},
{ "-PlaneOnOff", "UBYTE", PRUBYTE, BYTESIZE},
{ " NextImage", "struct Image *", PRPTR, PTRSIZE }
};
int i, sum;
int choice = -1;
level++;
while (choice)
{
sum = SetOptionText(string, structdata, (APTR)image, DATASIZE, 0);
switch (choice = GetChoice(DATASIZE))
{
case 6:
if (image->ImageData)
HexDump("Bitmap of Intuition Image",
image->ImageData,
INTSIZE,
(long)((((image->Width + 15) >> 4)
* image->Height
* image->Depth) << 1)
);
break;
case 9:
if (image->NextImage)
PrImage("The next Image", image->NextImage);
break;
}
}
level--;
}